package wiki.zimo.certificate_manage.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;
/**
 *
 * @author 子墨
 * @date 2018/10/9 17:04
 * @describe 辅导员信息实体类
 */
@Entity
public class Teacher {
    @Excel(name = "id" ,orderNum = "0")
    private String id;
    @Excel(name = "教工号" ,orderNum = "1")
    private String teacherNum;
    @Excel(name = "教师姓名" ,orderNum = "2")
    private String teacherName;
    @Excel(name = "联系电话" ,orderNum = "3")
    private String teacherTellphone;
    @Excel(name = "联系邮箱" ,orderNum = "4")
    private String teacherEmail;
    @Excel(name = "管理班级" ,orderNum = "5")
    private String teacherClass;
    @Excel(name = "所属二级学院" ,orderNum = "6")
    private String teacherSchool;
    private String teacherPassword;

    public Teacher() {
    }

    @Id
    @Column(name = "Id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "teacher_num")
    public String getTeacherNum() {
        return teacherNum;
    }

    public void setTeacherNum(String teacherNum) {
        this.teacherNum = teacherNum;
    }

    @Basic
    @Column(name = "teacher_name")
    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    @Basic
    @Column(name = "teacher_tellphone")
    public String getTeacherTellphone() {
        return teacherTellphone;
    }

    public void setTeacherTellphone(String teacherTellphone) {
        this.teacherTellphone = teacherTellphone;
    }

    @Basic
    @Column(name = "teacher_email")
    public String getTeacherEmail() {
        return teacherEmail;
    }

    public void setTeacherEmail(String teacherEmail) {
        this.teacherEmail = teacherEmail;
    }

    @Basic
    @Column(name = "teacher_class")
    public String getTeacherClass() {
        return teacherClass;
    }

    public void setTeacherClass(String teacherClass) {
        this.teacherClass = teacherClass;
    }

    @Basic
    @Column(name = "teacher_school")
    public String getTeacherSchool() {
        return teacherSchool;
    }

    public void setTeacherSchool(String teacherSchool) {
        this.teacherSchool = teacherSchool;
    }

    @Basic
    @Column(name = "teacher_password")
    public String getTeacherPassword() {
        return teacherPassword;
    }

    public void setTeacherPassword(String teacherPassword) {
        this.teacherPassword = teacherPassword;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Teacher teacher = (Teacher) o;
        return Objects.equals(id, teacher.id) &&
                Objects.equals(teacherNum, teacher.teacherNum) &&
                Objects.equals(teacherName, teacher.teacherName) &&
                Objects.equals(teacherTellphone, teacher.teacherTellphone) &&
                Objects.equals(teacherEmail, teacher.teacherEmail) &&
                Objects.equals(teacherClass, teacher.teacherClass) &&
                Objects.equals(teacherSchool, teacher.teacherSchool) &&
                Objects.equals(teacherPassword, teacher.teacherPassword);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, teacherNum, teacherName, teacherTellphone, teacherEmail, teacherClass, teacherSchool, teacherPassword);
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id='" + id + '\'' +
                ", teacherNum='" + teacherNum + '\'' +
                ", teacherName='" + teacherName + '\'' +
                ", teacherTellphone='" + teacherTellphone + '\'' +
                ", teacherEmail='" + teacherEmail + '\'' +
                ", teacherClass='" + teacherClass + '\'' +
                ", teacherSchool='" + teacherSchool + '\'' +
                ", teacherPassword='" + teacherPassword + '\'' +
                '}';
    }
}
